﻿using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XiaoYuStock.AppService;
using XiaoYuStock.Core;

namespace XiaoYuStock.Hosts.Jobs
{
   public  class CurrentDayJob : IJob
    {
        /// <summary>
        /// 执行任务
        /// </summary>
        /// <param name="context"></param>
        public void Execute(IJobExecutionContext context)
        {
            LogHelper.Info("获取当天汇总任务开始");

            try
            {
                DataMapping.GetSharesData();
            }
            catch (Exception ex)
            {
                LogHelper.Error("获取当天汇总任务异常" + ex.ToString() + ex.StackTrace);
                if (ex.InnerException != null)
                {
                    LogHelper.Error("内部错误" + ex.InnerException.ToString());
                }
            }

            LogHelper.Info("获取当天汇总任务完成");
        }
    }
}
